package com.zcl.javaClassAndObject.lambda;

/**
 * @Description:
 * @author: zcl
 * @date: 2022/3/4  14:33
 */
public class Program4 {

    public static void main(String[] args) {
        Program4 program4 = new Program4();


        If5 if5 = program4::test2;
        System.out.println(if5.test(5));

        If5 if51 = program4::test2;
        System.out.println(if51.test(8));

        If5 if52 = Program4::test;
        System.out.println(if52.test(8));
    }

    public static int test(int a){
        return a-4;
    }

    public int test2(int a){
        return a-3;
    }
}
